<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    function A(x) {
        this.x = x;
    }
    A.prototype.getX = function () {
        console.log(this.x)
    };

    function B(y) {
        this.y = y;
    }
    B.prototype = new A(200);
    B.prototype.constructor = B;
    B.prototype.getY = function () {
        console.log(this.y)
    };

    let b1 = new B(100);
    console.log(b1,b1.x,b1.y,b1.getX(),b1.getY());


    //    Object  基类




</script>
</body>
</html>